﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class ButtonHtml : UserControl
    {
        public ButtonHtml()
        {
            InitializeComponent();
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton1);
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton2);
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton3);
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton4);
        }

        private void radioButton5_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton5);
        }

        private void radioButton6_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton6);
        }

        private void radioButton7_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton7);
        }

        private void radioButton8_CheckedChanged(object sender, EventArgs e)
        {
            shezhi1(radioButton8);
        }
        public void shezhi1(RadioButton radioButtonly)
        {
            string str = "/";
            foreach (RadioButton o in groupBox2.Controls)
            {
                if (o.Checked)
                {
                    str += radioButtonly.Tag + "/" + o.Tag + "";
                }
            }
            textBox1.Text = str;
        }
        public void shezhi2(RadioButton radioButtonly)
        {
            string str = "/";
            foreach (RadioButton o in groupBox1.Controls)
            {
                if (o.Checked)
                {
                    str += o.Tag + "/" + radioButtonly.Tag + "";
                }
            }
            textBox1.Text = str;
        }
        private void radioButton16_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton16);
        }

        private void radioButton15_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton15);
        }

        private void radioButton14_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton14);
        }

        private void radioButton13_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton13);
        }

        private void radioButton12_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton12);
        }

        private void radioButton11_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton11);
        }

        private void radioButton10_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton10);
        }

        private void radioButton9_CheckedChanged(object sender, EventArgs e)
        {
            shezhi2(radioButton9);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string mystr = "";
            string anniu = "";
            string daxiao = "";
            string zhuti = "";
            string tubiao = "";
            foreach (RadioButton o in groupBox6.Controls)
            {
                if (o.Checked)
                {
                    anniu = o.Tag.ToString();
                }
            }
            mystr = "<" + anniu + " class='layui-btn ";
            foreach (RadioButton o in groupBox4.Controls)
            {
                if (o.Checked)
                {
                    daxiao = o.Tag.ToString();
                }
            }
            mystr += daxiao;
            if (checkBox1.Checked)
            {
                mystr += checkBox1.Tag.ToString();
            }
            foreach (RadioButton o in groupBox3.Controls)
            {
                if (o.Checked)
                {
                    zhuti = o.Tag.ToString();
                }
            }
            mystr += zhuti + "'>";

            foreach (RadioButton o in groupBox5.Controls)
            {
                if (o.Checked)
                {
                    tubiao = o.Tag.ToString();
                }
            }
            mystr += tubiao;
            mystr += " " + textBox3.Text + "</" + anniu + ">";

            textBox2.Text = mystr;
        }
    }
}
